/*
 * Created on Sep 1, 2005
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package com.erclab.internal.xpresso.reportelements;

import java.text.DecimalFormat;

import com.erclab.internal.xpresso.Application;
import com.erclab.internal.xpresso.conf.Settings;
import com.erclab.internal.xpresso.reports.Report;

/**
 * @author rodrigen
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class PrintCurrency extends PrintValue {

	protected DecimalFormat currency;

	public PrintCurrency(){
		currency = new DecimalFormat("$###,##0.00");
	}
	
	public String toHTML(String columnValue, String uniqueKeyValue,	Report theReport) {
		if (columnValue == null){
			return "$ 0.00";
		}
		
		return currency.format(Double.parseDouble(columnValue));
	}

}
